package com.nondo.dean.pay.mapper;

import com.nondo.dean.pay.domain.TransOrder;
import com.nondo.dean.pay.domain.TransOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface TransOrderMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=TransOrderSqlProvider.class, method="countByExample")
    long countByExample(TransOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @DeleteProvider(type=TransOrderSqlProvider.class, method="deleteByExample")
    int deleteByExample(TransOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Delete({
        "delete from pay_trans_order",
        "where trans_order_id = #{transOrderId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String transOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Insert({
        "insert into pay_trans_order (trans_order_id, mch_id, ",
        "mch_trans_no, channel_id, ",
        "amount, currency, ",
        "status, result, ",
        "client_ip, device, ",
        "remark_info, channel_user, ",
        "user_name, channel_mch_id, ",
        "channel_order_no, channel_err_code, ",
        "channel_err_msg, extra, ",
        "notify_url, param1, ",
        "param2, expire_time, ",
        "trans_succ_time, create_time, ",
        "update_time)",
        "values (#{transOrderId,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, ",
        "#{mchTransNo,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, ",
        "#{amount,jdbcType=BIGINT}, #{currency,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=TINYINT}, #{result,jdbcType=TINYINT}, ",
        "#{clientIp,jdbcType=VARCHAR}, #{device,jdbcType=VARCHAR}, ",
        "#{remarkInfo,jdbcType=VARCHAR}, #{channelUser,jdbcType=VARCHAR}, ",
        "#{userName,jdbcType=VARCHAR}, #{channelMchId,jdbcType=VARCHAR}, ",
        "#{channelOrderNo,jdbcType=VARCHAR}, #{channelErrCode,jdbcType=VARCHAR}, ",
        "#{channelErrMsg,jdbcType=VARCHAR}, #{extra,jdbcType=VARCHAR}, ",
        "#{notifyUrl,jdbcType=VARCHAR}, #{param1,jdbcType=VARCHAR}, ",
        "#{param2,jdbcType=VARCHAR}, #{expireTime,jdbcType=TIMESTAMP}, ",
        "#{transSuccTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(TransOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @InsertProvider(type=TransOrderSqlProvider.class, method="insertSelective")
    int insertSelective(TransOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=TransOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="trans_order_id", property="transOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_trans_no", property="mchTransNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.BIGINT),
        @Result(column="currency", property="currency", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="result", property="result", jdbcType=JdbcType.TINYINT),
        @Result(column="client_ip", property="clientIp", jdbcType=JdbcType.VARCHAR),
        @Result(column="device", property="device", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark_info", property="remarkInfo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_user", property="channelUser", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mch_id", property="channelMchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_code", property="channelErrCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_msg", property="channelErrMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="extra", property="extra", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="param1", property="param1", jdbcType=JdbcType.VARCHAR),
        @Result(column="param2", property="param2", jdbcType=JdbcType.VARCHAR),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="trans_succ_time", property="transSuccTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<TransOrder> selectByExampleWithRowbounds(TransOrderExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=TransOrderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="trans_order_id", property="transOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_trans_no", property="mchTransNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.BIGINT),
        @Result(column="currency", property="currency", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="result", property="result", jdbcType=JdbcType.TINYINT),
        @Result(column="client_ip", property="clientIp", jdbcType=JdbcType.VARCHAR),
        @Result(column="device", property="device", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark_info", property="remarkInfo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_user", property="channelUser", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mch_id", property="channelMchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_code", property="channelErrCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_msg", property="channelErrMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="extra", property="extra", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="param1", property="param1", jdbcType=JdbcType.VARCHAR),
        @Result(column="param2", property="param2", jdbcType=JdbcType.VARCHAR),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="trans_succ_time", property="transSuccTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<TransOrder> selectByExample(TransOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Select({
        "select",
        "trans_order_id, mch_id, mch_trans_no, channel_id, amount, currency, status, ",
        "result, client_ip, device, remark_info, channel_user, user_name, channel_mch_id, ",
        "channel_order_no, channel_err_code, channel_err_msg, extra, notify_url, param1, ",
        "param2, expire_time, trans_succ_time, create_time, update_time",
        "from pay_trans_order",
        "where trans_order_id = #{transOrderId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="trans_order_id", property="transOrderId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="mch_trans_no", property="mchTransNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_id", property="channelId", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.BIGINT),
        @Result(column="currency", property="currency", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="result", property="result", jdbcType=JdbcType.TINYINT),
        @Result(column="client_ip", property="clientIp", jdbcType=JdbcType.VARCHAR),
        @Result(column="device", property="device", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark_info", property="remarkInfo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_user", property="channelUser", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_mch_id", property="channelMchId", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_code", property="channelErrCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="channel_err_msg", property="channelErrMsg", jdbcType=JdbcType.VARCHAR),
        @Result(column="extra", property="extra", jdbcType=JdbcType.VARCHAR),
        @Result(column="notify_url", property="notifyUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="param1", property="param1", jdbcType=JdbcType.VARCHAR),
        @Result(column="param2", property="param2", jdbcType=JdbcType.VARCHAR),
        @Result(column="expire_time", property="expireTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="trans_succ_time", property="transSuccTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    TransOrder selectByPrimaryKey(String transOrderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=TransOrderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") TransOrder record, @Param("example") TransOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=TransOrderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") TransOrder record, @Param("example") TransOrderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=TransOrderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(TransOrder record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_trans_order
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Update({
        "update pay_trans_order",
        "set mch_id = #{mchId,jdbcType=VARCHAR},",
          "mch_trans_no = #{mchTransNo,jdbcType=VARCHAR},",
          "channel_id = #{channelId,jdbcType=VARCHAR},",
          "amount = #{amount,jdbcType=BIGINT},",
          "currency = #{currency,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "result = #{result,jdbcType=TINYINT},",
          "client_ip = #{clientIp,jdbcType=VARCHAR},",
          "device = #{device,jdbcType=VARCHAR},",
          "remark_info = #{remarkInfo,jdbcType=VARCHAR},",
          "channel_user = #{channelUser,jdbcType=VARCHAR},",
          "user_name = #{userName,jdbcType=VARCHAR},",
          "channel_mch_id = #{channelMchId,jdbcType=VARCHAR},",
          "channel_order_no = #{channelOrderNo,jdbcType=VARCHAR},",
          "channel_err_code = #{channelErrCode,jdbcType=VARCHAR},",
          "channel_err_msg = #{channelErrMsg,jdbcType=VARCHAR},",
          "extra = #{extra,jdbcType=VARCHAR},",
          "notify_url = #{notifyUrl,jdbcType=VARCHAR},",
          "param1 = #{param1,jdbcType=VARCHAR},",
          "param2 = #{param2,jdbcType=VARCHAR},",
          "expire_time = #{expireTime,jdbcType=TIMESTAMP},",
          "trans_succ_time = #{transSuccTime,jdbcType=TIMESTAMP},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where trans_order_id = #{transOrderId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(TransOrder record);
}